Interval<T>
Describes an interval of time to be used in time-based calculations. Provides methods to calculate rates and frequencies based on the interval value and type.Syntax
Inheritance
Constructors
Interval
Interval
Parameters
- value
T: The duration of the interval. - type IntervalType: The base unit that describes what the quantity of this Interval references.
Properties
Type
Returns
IntervalTypeValue
Returns
T
Methods
PerDay
Returns
decimal The number of occurrences per day as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerDay
Parameters
- quantity decimal: The quantity to multiply by the interval frequency.
Returns
decimal The total output per day as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerHour
Returns
decimal The number of occurrences per hour as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerHour
Parameters
- quantity decimal: The quantity to multiply by the interval frequency.
Returns
decimal The total output per hour as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerMinute
Returns
decimal The number of occurrences per minute as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerMinute
Parameters
- quantity decimal: The quantity to multiply by the interval frequency.
Returns
decimal The total output per minute as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerMonth
Returns
decimal The number of occurrences per month as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerMonth
Parameters
- quantity decimal: The quantity to multiply by the interval frequency.
Returns
decimal The total output per month as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerWeek
Returns
decimal The number of occurrences per week as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerWeek
Parameters
- quantity decimal: The quantity to multiply by the interval frequency.
Returns
decimal The total output per week as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerYear
Returns
decimal The number of occurrences per year as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.
PerYear
Parameters
- quantity decimal: The quantity to multiply by the interval frequency.
Returns
decimal The total output per year as a decimal value.Exceptions
[InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception): Thrown ifTis not convertible to a.